<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateConsumableStockTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('consumable_stock', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('consumable_id')->comment("耗材");
            $table->tinyInteger('type')->comment("类型: 0 入仓 1 核销");
            $table->unsignedInteger('stock')->comment("进仓数量");
            $table->string('remark')->nullable()->comment('耗材进仓说明');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('consumable_stock');
    }
}
